package com.bs.teachassistant.activity;

import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.bs.teachassistant.common.AppConfig;

import org.xutils.x;

/**
 * Created by limh on 2020/4/23.
 * aicitivy基类
 */

public abstract class BaseActivity extends AppCompatActivity {
    public AppConfig appConfig;
    public SharedPreferences userPreference;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        x.view().inject(this);
        appConfig = AppConfig.getAppConfig();
        userPreference=getSharedPreferences("user",MODE_PRIVATE);
        initViews();
        initDatas();
    }

    public abstract void initViews();

    public abstract void initDatas();
}
